<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	{% include 'common-css/css.html' %}
	<title>新增博客</title>
	<style type="text/css">
		textarea {
			height: 400px;
			width: 100%;
			padding: 5px;
			border-radius: 6px;
		}

		#result {
			height: 400px;
			width: 100%;
			padding: 5px;
			border: 1px solid #999999;
			border-radius: 6px;
			word-wrap: break-word;
			overflow: auto;
		}
	</style>
</head>
<body>
<div class="div-main">
	<div class="layui-form layui-form-pane">
		<input type="hidden" id="blog_id">
		<div class="layui-row">
			<div class="layui-col-md4">
				<div class="layui-form-item">
					<label class="layui-form-label">博客标题</label>
					<div class="layui-input-inline">
						<input type="text" id="title" autocomplete="off" placeholder="请输入标题" class="layui-input">
					</div>
				</div>
			</div>
			<div class="layui-col-md4">
				<div class="layui-form-item">
					<label class="layui-form-label">选择分类</label>
					<div class="layui-input-inline">
						<select id="select_classify">
							<option value=""></option>
						</select>
					</div>
				</div>
			</div>
			<div class="layui-col-md2">
				<button class="layui-btn layui-btn-primary" id="add_classify">新增分类
					<i class="layui-icon">&#xe654;</i>
				</button>
			</div>
			<div class="layui-col-md2">
				<select lay-verify="required" id="status">
					<option value="1" selected>公开</option>
					<option value="0">草稿</option>
				</select>
			</div>
		</div>
	</div>

	<div class="layui-row">
		<div class="layui-col-md6">
			<textarea id="oriContent" placeholder="请输入博客内容，支持markdown语法..." onkeyup="convert()"></textarea>
		</div>
		<div class="layui-col-md6">
			<div id="result"></div>
		</div>
	</div>

	<div class="layui-row layui-form" style="margin-top: 20px">
		<div class="layui-col-md2">
			<button class="layui-btn layui-btn-primary" id="save">保存
				<i class="layui-icon">&#xe618;</i>
			</button>
		</div>
	</div>
</div>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}layui/layui.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/showdown.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/blog/add_blog.js"></script>

</body>
</html>
<div id="add_blog_classify" class="layui-form layui-form-pane"
     style="padding: 10px 20px;display: none;">
	<div class="layui-form-item" style="margin-top: 20px">
		<label class="layui-form-label">类 别</label>
		<div class="layui-input-block">
			<input type="text" id="classify" autocomplete="off" placeholder="请输入博客类别" class="layui-input">
		</div>
	</div>
	<div class="layui-main" style="margin-top: 20px;width: 80px">
		<button class="layui-btn layui-btn-primary" id="save_classify">新 增
			<i class="layui-icon">&#xe618;</i>
		</button>
	</div>
</div>